<!doctype html>
<html>
<head>
    <title>{$item['title']}</title>
    <meta charset="UTF-8">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="yes" name="apple-touch-fullscreen">
    <meta content="telephone=no" name="format-detection">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0"/>
    <link rel="stylesheet" href="{$file}/css/mobile.common.css">
    <link rel="stylesheet" type="text/css" href="{$file}/css/common.css">
    <link rel="stylesheet" type="text/css" href="{$file}/css/index.css">
    <link rel="stylesheet" type="text/css" href="{$file}/css/loading.css">
    <script src="{$file}/js/loading.js"></script>
    <script src="{$file}/js/zepto.min.js"></script>
    <script src="{$file}/js/render.js"></script>


    <script type="text/javascript">
        window.slotData = {};

        var href = window.location.href;
        var userAgent = navigator.userAgent.toLowerCase();
        if(
                href.indexOf('#') > 0 &&
                userAgent.indexOf('micromessenger') === -1 &&
                userAgent.indexOf('weibo') === -1 //&&
        //userAgent.indexOf('qq') === -1
        ) {
            window.location.href = decodeURIComponent(href.split('#')[1]);
        }
        window.iFrameHeight = function(id) {
            var ifm= document.getElementById(id);
            var subWeb = document.frames ? document.frames[id].document : ifm.contentDocument;
            if(ifm != null && subWeb != null) {
                ifm.height = subWeb.body.scrollHeight;
            }
        }
        window.bodyLoading = function() {
            window.isBoayLoaded = true;
            if(window.isApiLoaded) {
                window.loading.hide();
            }
        }

    </script>
    <style>
        .app-guide {
            background-color: rgba(0, 0, 0, .64);
            bottom: 0;
            box-shadow: 0 -1px 1px rgba(0, 0, 0, .1);
            height: 50px;
            left: 0;
            position: fixed;
            width: 100%;
            z-index: 1999;
        }
        .app-guide .guide-cont {
            display: block;
            padding: 4px 0 4px 20px;
            position: relative;
        }
        .app-guide .guide-close {
            height: 20px;
            left: 0;
            line-height: 999em;
            overflow: hidden;
            position: absolute;
            top: 0;
            width: 20px;
        }

        .app-guide .guide-close:before {
            background-color: #262626;
            border-radius: 28px;
            bottom: 2px;
            content: "";
            height: 28px;
            position: absolute;
            right: 3px;
            width: 28px;
        }

        .app-guide .guide-close:after {
            background: url("../addons/jy_h5game/custom/templates/mobile/games/hd_shake/images/477096d1jw1esladaxya6j201v01w741.jpg")
            no-repeat scroll 0 0/9px auto rgba(0, 0, 0, 0);
            content: "";
            height: 9px;
            left: 2px;
            position: absolute;
            top: 4px;
            width: 9px;
        }

        .app-guide .guide-slogon, .app-guide .guide-dc {
            color: #fff;
            font-size: 16px;
            line-height: 20px;
            padding-left: 50px;
        }

        .app-guide .guide-logo {
            max-height: 42px;
            max-width: 42px;
            margin-right: 8px;
            vertical-align: top;
            border: 0 none;
            position: absolute;
        }
        img {
            width: auto;
            height: auto;
            max-width: 100%;
            vertical-align: middle;
            border: 0;
            -ms-interpolation-mode: bicubic;
        }

        .shake_area {
            padding-top:1em;
            padding-bottom:2em;
            background: #e4432d url("") center no-repeat;
            background-size: 100% auto;
            -moz-background-size: 100% auto;
            -webkit-background-size: 100% auto;
        }

        #mcover {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.7);
            display: none;
            z-index: 20000;
        }
		.error_dialog_drop {top:0}
		.sweet-alert p {padding-top:10px}
    </style>

   <link rel="stylesheet" type="text/css" href="{$file}/css/sweet-alert.css">
    <script type="text/javascript" src="{$file}/js/sweet-alert.min.js"></script>
    <script>
	     var id = '{php echo $e}';
         var token = '{php echo $token}';
	     var welcomeurl = '{php echo $welcomeurl}';
	     var awardurl = '{php echo $awardurl}';
	     var leftPlayCount = '{php echo $leftPlayCount}';
        var DataUrl="../api.php?this=custom&token="+token+"&plugin=jy_h5game&action=choujiang&rid="+id;

        var PrizeUrl="../api.php?this=custom&token="+token+"&plugin=jy_h5game&action=choujiang&rid="+id;

        var IMG_PRE="{$_W['attachurl']}";
        var SuccessUrl = awardurl;
    </script>

</head>
<body onload="bodyLoading();">
<style>
.fe-floatback {width: 32px; position: fixed; top: 40px;left:4px; text-align: center; z-index: 1003;}
.fe-floatback a{ display: block; width: 32px; height: 32px;}
.fe-floatback a img{width:32px;height:32px;opacity:0.5;}
{$item['diycss']}
</style>
<div class="fe-floatback">
		<a href="{$backurl}">
			<img src="../core/resource/images/goback.png"></i>
		</a>
</div>
<div class="loading tx_pageLoading" id="tx_pageLoading"><center><var id="loading_var">0%</var><sub></sub><p>马上开始摇一摇…</p></center></div>
<div id="body" >
    <dl class="prodoct_box" ng-show="is_has_product_info" style="display:none;">
        <dt>
            <img ng-src="share.goods_img_url">
        </dt>
        <dd>
            <a href="javascript:void(0);" class="close" id="tx_btnCloseProduct"></a>
            <h2>好友正在抢福利</h2>
            <p><span class="name" ng-bind="share.goods_name"></span><span>价值</span><span ng-bind="share.goods_price"></span><span>元</span></p>
        </dd>
    </dl>
    <div class="area_box" >
        <a href="javascript:void(0);" class="current_areat_button">
            <span class="name" id="btn_active_rule">活动规则</span>
            <span class="arrow_right"></span>
        </a>

    </div>

    <div class="shake_area">
        <div class="shake_area_title_box">
            <div  style="display:block;">
                <img class="title" src="" alt="" >
            </div>
            <div ng-show="title" class="title_text" style="display:none;">
                <span ng-bind="title"></span>
            </div>
        </div>
        <div class="shake_box">
             <img class="bg" src="{$file}/images/shake_circle_bg.png">
            <img class="bg circle" src="{$file}/images/shake_circle.png">
            <div id="zoomIn" class="step_1"></div>
            <img id="dotDefault" class="dots" src="{$file}/images/icon_dots_default.png">
            <img id="dotHighlight" class="dots highlight" src="{$file}/images/icon_dots.png">

            <div class="inside">
                <img id="gesture" class="gesture" src="{$file}/images/gesture.png" style="display:none">
                <img id="gesture2" src="{$file}/images/not_choose.png" style="display:none">
                <div class="mid">
                    <div id="doorR" class="door_r"></div>
                    <div id="doorL" class="door_l"></div>
                </div>
            </div>
        </div>
        <p class="shake_btn"><a id="startBtn" href="javascript:;" class="shake_start">摇摇有惊喜</a></p>

        <div class="shake_tip" ng-bind="near_merchant.conductWord"></div>
    </div> <!-- shake area -->

    <div class="list_box">
        <div class="content">
            <div ng-show="is_show_lucky_guy_list" style="display:none" class="winner_list_box">
                <div class="winner_list">
                    <div class="winner_list_content">
                        <ul>
                            <li ng-repeat="lucky in lucky_guy_list">
                                手机用户<span ng-bind="lucky.phone"></span>摇中价值<b><span ng-bind="lucky.price"></span></b>元的<span ng-bind="lucky.goods_name"></span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>

            <div class="line" ng-show="is_show_lucky_guy_list" style="display:none" >

            </div>


            <div class="product_list">
                <h2>
                  <!--  <a href="javascript:void(0);" id="my_prize">我的中奖记录</a> -->
                    <a href='{$awardurl}'>中奖名单</a>
                    
                </h2>
                <ul ng-show="isHasItems" id="ul_prize" style="display:none">
                    <li ng-repeat="item in slot_machine.award">
                        <div class="img">
                            <img ng-src="item.goods_img">
                        </div>
                        <div class="info">
                            <h3 ng-bind="item.goods_name"></h3>
                            <h4><span ng-bind="item.tgs"></span></h4>
                            <h4><span ng-bind="item.summary"></span></h4>
                            <p>
                                <span>
                                   <span></span>
                                    <span class="red">￥</span>
                                    <span ng-bind="item.price" class="prise red"></span>
                                </span>

                                <b ng-bind="item.remain"></b>

                            </p>

                        </div>
                    </li>
                </ul>


                    <ul  id="ul_myprize" style="display:none">
                        {if !empty($userPrizes)}
                        {loop $userPrizes $userp}
                            <li >
                                <div class="img">
                                    <img src="">
                                </div>
                                <div class="info">
                                    <h3 >{$userp['pname']}</h3>
                                    <h4>提供商：<a href="{$userp['tgs_url']}" style='font-size:1em' >{$userp['tgs']}</a></h4>
                                    <h4>
                                        <span >中奖时间:{php echo date("Y-m-d H:i", $userp['createtime'])}</span>
                                    </h4>
                                    <p>
                                <span>
                                <span></span>
                                <span class="red">￥</span>
                                <span  class="prise red">{$userp['price']}</span>
                                </span>
                                        <b>{if $userp['status']==1}<a href="">兑换</a>{/if}{if $userp['status']==2}已兑换{/if}</b>
                                    </p>

                                </div>
                            </li>
                        {/loop}
                        {else}
                            <li>暂还没有中奖记录，赶紧加油哦！</li>
                        {/if}

                    </ul>

                <div  class="product_list_info" style="display:block;">{$shake['copyright']}</div>
                <div class="tx_loading product_list_loading" style="display:none;">正在载入...</div>
            </div>
        </div>
        <div class="bottom">

        </div>
    </div>

    <div class="dialog_cover" id="dialog_cove" style="display:none;"></div>


    <div class="active_rule_box" style="display:none;">
        <div class="title">
            <h2>活动规则</h2>
            <span class="close"></span>
        </div>
        <div class="content" ng-show="!slot_machine_rule" >
            {$item['content']}
        </div>
        <div class="content" ng-show="slot_machine_rule" style="display:none;">
            <p>
                <span ng-bind="slot_machine_rule"></span>
            </p>
        </div>
    </div>


    <div class="error_dialog error_dialog_drop" id="error_dialog" style="display:none">
        <div class="title">哎呀竟然没中！</div>
        <div class="content">
            <div class="img">
                <img src="{$file}/images/come_late.png">
            </div>
            <div>
                <button  type="button" class="buttonDefault" id="btn_reset">再玩一次</button>
            </div>
        </div>
    </div>

    <div class="error_dialog error_dialog_drop" id="stop_dialog" style="display:none">
        <div class="content">
            <div class="img">
                <img src="{$file}/images/come_late.png">
            </div>
            <div class="text">活动已经结束了～</div>
            <div>
                <a  href="#" class="buttonDefault" id="btn_reset">看看更多中奖机会</a>
            </div>
        </div>
    </div>
</div>

<div style="height:0px;overflow:hidden;">
    <audio  id="audio_start_shake" controls="controls" preload="auto">
        <source src="{$file}/images/shake_first_two_frame.mp3" type="audio/mpeg" />
    </audio>
    <audio  id="audio_start_win" controls="controls" preload="auto">
        <source src="{$file}/images/tiger_win_sound2.mp3" type="audio/mpeg" />
    </audio>
</div>
{if $item['top_banner_show'] == 1}
<div id="bannerDowm" class="app-guide"><a class="guide-cont ad_link" href="{$item['top_banner_url']}">
    <img class="guide-logo" alt="" src="">

    <div class="guide-slogon">{$item['top_banner_title']}</div>
</a> <span class="guide-close">关闭</span>

</div>
{/if}

<div id="mcover" onclick="$(this).hide()"><img src=""></div>

<iframe src="" id="end_error_dialog" scrolling="no" onload="iFrameHeight('end_error_dialog')"></iframe>
<iframe src="" id="success_dialog" scrolling="no" onload="iFrameHeight('success_dialog')"></iframe>


<script src="{$file}/js/scroll_loading.js"></script>

<script src="{$file}/js/list.js"></script>
<script src="{$file}/js/fx.js"></script>
<script src="{$file}/js/shake.min.js"></script>
<script src="{$file}/js/index.js?v=20200308"></script>
<script src="{$file}/js/animate.js"></script>

</body>

<script>
    $(function(){
        $("#my_prize").click(function(){
            $("#ul_prize").hide();
            $("#ul_myprize").show();
        });

        $("#prize").click(function(){
            $("#ul_prize").show();
            $("#ul_myprize").hide();
        });

        $(".guide-close").click(function(){
            $("#bannerDowm").hide();
        });

       var follow = "{$follow}";

        if (follow ==1){
         //   showFollowDialog();
        }

    });

    function showFollowDialog()
    {
        swal({
            title: "提示",
            text: "{$item['follow_dlg_tip']}",
            type: "warning",
            showCancelButton: false,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "{$item['follow_btn_name']}",
            closeOnConfirm: false },
            function(){
                    window.top.location.href ="{$item['follow_url']}";
            });
    }
    function winMsg(msg) {
       alert(msg);
    }
    function shareDialogMsg(msg) {

        swal({
                    title: "提示",
                    text: msg,
                    type: "warning",
                    showCancelButton: true,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "分享",
                    cancelButtonText: "取消",
                    closeOnConfirm: false },
                function(){
                     $("#mcover").show();
					
					 
					 
                });
        }
	function successMsg(msg) {
        swal({
                    title: "中奖啦",
                    text: msg,
                  //  type: "warning",
                   // showCancelButton: true,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "再玩一次",
                    closeOnConfirm: true 
					},
                function(){
                     $("#mcover").show();
					 window.top.location.href =welcomeurl;
					 
					 
                });
    }
    function dialogMsg(msg) {

             swal({
                    title: "提示",
                    text: msg,
                    type: "warning",
                    showCancelButton: false,
                    confirmButtonColor: "#DD6B55",
                    confirmButtonText: "确定",
                    closeOnConfirm: true },
                function(){

                });
    }
</script>
</html>
